package controller.admin;

import com.sun.deploy.util.FXLoader;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Stage;
import sample.Admin.AdminCourse;
import sample.Admin.AdminSelectCourse;
import sample.Admin.AdminStu;
import sample.Admin.AdminTeacher;

import java.text.MessageFormat;

public class AdminController {
    @FXML
    private Label adm_main_lbl_psw;
    @FXML
    private Label adm_main_lbl_aid;
    @FXML
    private  Button adm_main_btn_exit;
    @FXML
    private  Button adm_main_btn_stu;
    public void exit(){
        Stage stage = (Stage)adm_main_btn_exit.getScene().getWindow();
        System.out.printf("管理员%s退出",adm_main_lbl_aid.getText());
        stage.close();
    }
    public void findstu() throws Exception {
       new AdminStu().start(new Stage());
    }
    public void findtea() throws Exception {
        new AdminTeacher().start(new Stage());
    }
    public  void findcourse()throws Exception{
        new AdminCourse().start(new Stage());
    }
    public void findsel()throws Exception{
        new AdminSelectCourse().start(new Stage());
    }


}
